﻿using Microsoft.EntityFrameworkCore;
using MyEartags.EarTag;
using MyEartags.Hint;
using MyEartags.Individual;
using MyEartags.PairVariety;
using MyEartags.SheepTag;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace MyEartags.EntityFrameworkCore;

[ConnectionStringName(MyEartagsDbProperties.ConnectionStringName)]
public class MyEartagsDbContext : AbpDbContext<MyEartagsDbContext>, IMyEartagsDbContext
{
    /* Add DbSet for each Aggregate Root here. Example:
     * public DbSet<Question> Questions { get; set; }
     */

    public DbSet<Varieties> Varieties { get; set; }         // 对用品种表

    public DbSet<Earoverbit> Earoverbit { get; set; }   // 耳号表

    public DbSet<SheepLabel> SheepLabel { get; set; }   // 羊只戴标表

    public DbSet<Allocation> Allocation { get; set; }   // 待配提示表

    public DbSet<Gestation> Gestation { get; set; }     // 妊检提示表

    public DbSet<Delivery> Delivery { get; set; }       // 分娩提示表

    public DbSet<ZooidBuy> ZooidBuy { get; set; }       // 个体采购表

    public DbSet<ZooidSelling> ZooidSelling { get; set; }       // 个体销售表

    public MyEartagsDbContext(DbContextOptions<MyEartagsDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureMyEartags();
    }
}
